package com.tc.data.spring.validator;

import org.springframework.aop.Pointcut;
import org.springframework.aop.support.AbstractBeanFactoryPointcutAdvisor;

import java.util.List;

/**
 *  @author zhixin02.liu
 */
public class TransactionAnnotationValidateAdvisor extends AbstractBeanFactoryPointcutAdvisor {

	private static final long serialVersionUID = -3487673060064557244L;

	private final TransactionAnnotationPointcut pointcut = new TransactionAnnotationPointcut();

	@Override
	public Pointcut getPointcut() {
		return pointcut;
	}

	public void setValidator(List<TransactionAnnotationValidator> validators) {
		pointcut.addValidators(validators);
	}
}
